﻿@namespace MudBlazor
@inherits MudComponentBase
@using System.Text.RegularExpressions
@using static MudBlazor.Components.Highlighter.Splitter

@foreach (var fragment in _fragments.Span)
{
    if (IsMatch(fragment))
   {
      <mark class="@Class" style="@Style" @attributes="@UserAttributes"> @fragment </mark>
   }
   else if (Markup)
   {
      @ToRenderFragment(fragment)
   }
   else
   {
      @fragment
   }
}
